package com.kapukapu.authorization.service.feign;

import com.kapukapu.authorization.service.feign.fallback.IUserServiceFallback;
import com.kapukapu.common.api.user.dto.AuthUserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author sivan
 * @email zifanuu@gmail.com
 */
@FeignClient(value = "template-user-server", fallback = IUserServiceFallback.class)
public interface IUserService {

	/**
	 * 根据用户名获取用户信息
	 *
	 * @param username 用户名
	 * @return
	 */
	@GetMapping("/login/info")
	AuthUserDTO getLoginInfoByUsername(@RequestParam("username") String username);

}
